package exp1;

import java.util.Random;
import java.util.Scanner;

public class Random1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int maxn = (int)1e6 + 5;
        int n = sc.nextInt();
        Random ran = new Random();
        int [] a = new int[maxn];
        int cnt = 0;
        // start
        long stime = System.nanoTime();
        while(cnt < n) {
            boolean flag = false;
            int temp = ran.nextInt(n) + 1;
            for (int i = 0; i < cnt; i++) {
                if (temp == a[i]) {
                    flag = true;
                    break;
                }
            }
            if (flag) continue;
            a[cnt] = temp;
            System.out.print(temp + " ");
            cnt++;
        }
        // end
        long etime = System.nanoTime();
        System.out.println();
        System.out.println(etime - stime);
    }
}
